<template>
	<div class="detail">
		这是详情页
		<p>{{$store.state.testCount}}</p>
		<hr>
		<Menu :counter="count" :message="message" @addVal="getVal"></Menu>
		<Side>
			<template slot="header" slot-scope="props">
				<p>这是详情页边栏header{{props.msg}}</p>
				
			</template>
		</Side>

		{{total}}
		<hr>
		<p>这是vuebus的测试父组件值：{{total}}</p>
		

	</div>
</template>


<script>

import Menu from '@/components/Menu';
import Side from '@/components/Side'

export default {
	name: 'Detail',
	components: {
		Menu,
		Side
	},
	data(){
		return {
			message: '这是父组件的parents',
			count: 3,
			total: 0,
			getChildName: ''
		}
	},
	mounted() {
		// window.document.title = 'afasff'

	},
	created() {
		this.$bus.on('add',(mes)=>{
			this.total += mes
		})
	},
	methods: {
		getVal(getTotal) {
			this.total += getTotal;
		}

		
	}
}
	
</script>


<style lang="less">
	
</style>